<?php


define('ROOT_PATH',realpath(__DIR__));
define('APP',ROOT_PATH.'/App');
define('KERNEL',ROOT_PATH.'/Kernel');
define('VIEW',ROOT_PATH.'/views');
$classMap = [];
//debug函数
include KERNEL.'/Helper.php';


spl_autoload_register('autoload');
//自动加载
function autoload($className){
    $replace = str_replace('\\','/',$className);
    try {
        include ROOT_PATH . '/' . $replace . '.php';
    }catch (Error $e)
    {
        echo $replace;
        exit;
    }
}
//核心启动
$kernel = new Kernel\Kernel();
//启动
$kernel->run();





